/**
 * 书籍借阅表
 */
 module.exports = function (sequelize, DataTypes,Model) {
    class BorrowModel extends Model {
    }
    BorrowModel.init({
        id: {
            type: DataTypes.INTEGER,
            primaryKey: true,
            autoIncrement: true,
            comment:"主键"
        },
        borrower: {
            type: DataTypes.STRING,
            allowNull: false,
            comment:"借阅人"
        },
        bookid: {
            type: DataTypes.INTEGER,
            allowNull: false,
            comment: "书籍id",
        },
        owner: {
            type: DataTypes.STRING,
            allowNull: false,
            comment: "书籍拥有者",
        },
        create_time: {
            type: DataTypes.DATE,
            allowNull: true,
            comment: "借阅时间点",
        },
    }, {
        sequelize,
        modelName:"borrow"
    })
    return BorrowModel
}